/*
 *  This file is part of "SchoolChoice",
 *  a school registration system.
 *
 *  Copyright (C) 2009 Nicolas Decerf, Olivier Jacquemin.
 *
 *  "SchoolChoice" is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  "SchoolChoice" is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program: see the file COPYING.txt.  If not, see
 *  http://www.gnu.org/licenses/.
 */

package be.schoolchoice.webapp.data;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class School {
    @PrimaryKey
    @Persistent
	private String id = "";

    @Persistent
    private String streetAndNumber = "";

    @Persistent
    private String postalCode = "";

    @Persistent
    private String city = "";

    @Persistent
    private long availableSeats = 0;
    
    /**
     * Constructor without arguments: mandatory for jabsorb serialization.
     * (Avoids "could not unmarshall" error.)
     */
    public School() {    	
    }
    
    public School(String identifier, String streetAndNumber, String postalCode,
			String city, long availableSeats) {
		super();
		this.id = identifier;
		this.streetAndNumber = streetAndNumber;
		this.postalCode = postalCode;
		this.city = city;
		this.availableSeats = availableSeats;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getStreetAndNumber() {
		return streetAndNumber;
	}

	public void setStreetAndNumber(String streetAndNumber) {
		this.streetAndNumber = streetAndNumber;
	}

	public String getPostalCode() {
		return postalCode;
	}

	public void setPostalCode(String postalCode) {
		this.postalCode = postalCode;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public long getAvailableSeats() {
		return availableSeats;
	}

	public void setAvailableSeats(long availableSeats) {
		this.availableSeats = availableSeats;
	}

}
